<?php
/**
 * @package WordPress
 * @subpackage desire
 */
?>
<?php
global $desireoptions;
?>
<?php if(!have_posts()) : ?>
    <div id="post-0" class="post error404 not-found">
        <h2 class="entry-title"><?php _e('Entry not found','desire'); ?></h2>
        <div class="entry-content">
            <p><?php _e('Oops no entries found. Try using the search!','desire'); ?></p>
            <p><?php get_search_form(); ?></p>
        </div>
    </div>
<?php endif; ?>
<?php while(have_posts()) : the_post(); ?>
    <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
        <h2 class="entry-title"><?php the_title(); ?></h2>
        <div class="entry-meta">
            <span class="entry-date"><a href="<?php the_permalink(); ?>"><?php /* translators: draft saved date format, see http://php.net/date */ the_time(__('M jS, Y', 'desire' )); ?></a></span>
            <span class="entry-comments"><?php comments_popup_link( __( 'Leave a comment', 'desire' ), __( '1 Comment', 'desire' ), __( '% Comments', 'desire' ) ); ?><?php edit_post_link( __( 'Edit', 'desire' ), '<span class="meta-sep">|</span><span class="edit-link">', '</span>' ); ?></span>
        </div>
        <?php if(is_single() and $desireoptions['show_category_single'] and get_the_category_list() != ""): ?>
        <div class="entry-cat">
            <span class="entry-categories"><?php _e('Posted in: ','desire'); ?><?php echo get_the_category_list(', '); ?></span>
        </div>
        <?php endif; ?>
        <div class="entry-content">
            <?php the_content( __( 'Read more', 'desire' ) ); ?>
            <?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'desire' ), 'after' => '</div>', 'link_before' => '<span>', 'link_after' => '</span>' ) ); ?>
        </div>
        <?php
            $tags_list = get_the_tag_list( '', ', ' );
            if (trim($tags_list) !="" and is_single() and $desireoptions['show_tags_single']):
        ?>
        <div class="entry-tags"><span class="tag-links"><?php _e('Tagged in:','desire'); ?> <?php echo $tags_list; ?></span></div>
        <?php endif; ?> <!-- end of tag list if -->
        <?php if(is_single()): ?>
            <?php desire_bookmarks(); ?>
        <?php endif; ?>
        <?php if(is_single()): ?>
        <div class="post-navigation">
	    <div class="post-previous"><?php previous_post_link( '%link', '<span class="meta-post-nav">' . _x( '&larr;', 'Previous post link', 'desire' ) . '</span> %title' ); ?></div>
	    <div class="post-next"><?php next_post_link( '%link', '%title <span class="meta-post-nav">' . _x( '&rarr;', 'Next post link', 'desire' ) . '</span>' ); ?></div>
            <div class="clear"></div>
	</div>
        <?php endif; ?>
    </div>
    <?php comments_template( '', true ); ?>
<?php endwhile; ?>